package com.jgr;

import com.jgr.dao.BookDao;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.applet.AppletContext;

public class AppForLifeCycle {
    public static void main(String[] args) {

        ClassPathXmlApplicationContext ctx=new ClassPathXmlApplicationContext("applicationContext.xml");


        BookDao bookDao = (BookDao) ctx.getBean("bookDao");
        bookDao.save();
    //    ctx.registerShutdownHook();
        ctx.close();


    }
}
